{template 'web/common/common'}
{template 'web/land/navbar'}
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/style.css" />
<div class="panel panel-success">
    <div class="panel-heading">
        <h3 class="panel-title">
            土地>编辑1
        </h3>
    </div>
    <div class="panel-body">
        <form id="sign-form" class="form-horizontal" role="form" method="post" action="{url 'site/entry/land',array('m'=>'kundian_farm','op'=>'land_list_save','version_id'=>$_GPC['version_id'])}" name="submit" style="padding: 20px 0;">
            <div class="form-group">
                <label class="col-sm-2 control-label">名称</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"  name="land_name" value="{$list['land_name']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">分类</label>
                <div class="col-sm-8">
                    <select name="type_id" class="form-control">
                        <option value="0">请选择</option>
                        {loop $typeData $index $item}
                        <option value="{$item['id']}" <?php if($list['type_id']==$item['id']){echo 'selected';}?> >{$item['name']}</option>
                        {/loop}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">选择土地监控</label>
                <div class="col-sm-8">
                    <select name="live_id" class="form-control">
                        <option value="0">请选择</option>
                        {loop $liveData $index $item}
                        <option value="{$item['id']}" <?php if($list['live_id']==$item['id']){echo 'selected';}?> >{$item['title']}</option>
                        {/loop}
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">封面(345*450)</label>
                <div class="col-sm-8">
                    {php echo tpl_form_field_image('cover',$list['cover']);}
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">总面积（X/㎡）</label>
                <div class="col-sm-8">
                    <input type="number" class="form-control"  name="all_area" value="{$list['all_area']}">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">已种植面积（X/㎡）</label>
                <div class="col-sm-8">
                    <input type="number" class="form-control"  name="area" value="{$list['area']}">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">未种植面积（X/㎡）</label>
                <div class="col-sm-8">
                    <input type="number" class="form-control"  name="residue_area" value="{$list['residue_area']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">排序</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"  name="rank" value="{$list['rank']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">可种植的种子</label>
                <div class="col-sm-8">
                    {loop $seedData $key $val}
                        <input type="checkbox" style="margin-left: 20px;" name="seed[]" value="{$val['id']}" <?php if($val['is_checked']==1){echo 'checked';} ?> >{$val['send_name']}
                    {/loop}
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <input type="hidden" name="id" value="{$list['id']}">
                    <button type="submit" class="btn btn-success">保存</button>
                    <a class="btn btn-default" href="{url 'site/entry/land',array('m'=>'kundian_farm','op'=>'land_list')}">返回</a>
                </div>
            </div>
        </form>
    </div>
</div>
